package com.lzw.job;

import com.lzw.ddns.DDNS;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author liuzw
 * @date 2021/10/30
 */
@Slf4j
@Component
public class JobFactory {

    @Autowired
    private DDNS ddns;

    @Scheduled(cron = "${ddns.cron}")
    public void DDNSScheduled() {
        log.info("开始执行DDNS任务");
        ddns.init();
    }

}
